﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BBPA.Admin.SYS.Goods_BuyPrice_Log
{
    public partial class list_WaitRead : ListPage
    {
        BLL.V_Goods_BuyPrice_Log bllList = new BLL.V_Goods_BuyPrice_Log();
        BLL.Goods_BuyPrice_Log bll = new BLL.Goods_BuyPrice_Log();
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.show_btn_add = Master.show_btn_bat_del = Master.show_edit = Master.show_info = false;
            Master.BasicSQL = "HasRead=0";
        }
        public override void buildSQL_Page_List_search()
        {
        }
        public override DataSet get_Page_DataSet(string sql_, string orderby_, int pageFrom_, int pageTo_) { return bllList.GetListByPage(sql_, orderby_, pageFrom_, pageTo_); }
        public override void bat_Page_List(string inStr_, string action_)
        {
            if (action_ == "hasread")
            {
                foreach (string id in inStr_.Split(','))
                {
                    int thisID = DataTypePlus.requestInt(id);
                    Model.Goods_BuyPrice_Log model = bll.GetModel(thisID);
                    model.HasRead = true;
                    bll.Update(model);
                    //BLL.User_Operate_Log.Add(Security.GetCurrentUserID(), EnumHelper.TableName.Orders, thisID, EnumHelper.OperateType.Update, "修改订单状态:准备采购");
                    
                }
            }
        }
    }
}